library(tidyverse)
library(fixest)
library(showtext)
library(vtable)
library(writexl)
library(haven)
library(gridExtra)

setwd('D:\\WorkingPaper-Series\\Township_Light\\Replication_Files\\workdata')

#################################
########## Figure 1 #############
#################################


township_panel_final <- read_dta('township_panel_final.dta')

township_panel_final %>% select(year,N_village) %>% group_by(year) %>% 
  summarise(N_TBV = sum(N_village)) %>% ggplot(aes(year,N_TBV))+
  geom_vline(xintercept = 2016,color = '#5C5C5C', lwd = 1, lty = 2)+
  geom_line()+geom_point()+
  theme_bw()+
  theme(text = element_text(family = 'serif',size = 8),
        axis.text =  element_text(family = 'serif',size = 8))+
  scale_x_continuous(breaks = c(seq(2010,2020,2)))+
  labs(y = 'Number of TBV', x = 'Year')
